<HTML>
	<TITLE>Workflow.NET
		<%#actionname%>
		-<%#propertyname%></TITLE>
	<STYLE><%#stylesheet%>
	</STYLE>
	<BODY marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
		<form name="wf_theform" method="post" ID="Form1">
			<TABLE width="100%" height="100%" bgcolor="<%#bgcolor%>" cellspacing="0" cellpadding="0" border="0" ID="Table1">
				<TR>
					<TD valign="top">
						<TABLE ID="Table2" width="100%" height="100%">
							<TR>
								<TD valign="top">
									<IFRAME name="frame_multipleoptions" src="<%#requeststring%>&amp;pagesection=multipleoption&amp;_mode=<%#mode%>&amp;_pageinfo=<%#pageinfo%>&amp;_wizardsessionid=<%#wizardsessionid%>&amp;optionsStr=<%#optionsStr%>" width="100%" height="100%">
									</IFRAME>
								</TD>
							</TR>
						</TABLE>
					</TD>
				</TR>
				<TR>
					<TD height="1" bgcolor="black"><IMG src="?drawimage=spacer.gif" height="1" width="1"></TD>
				</TR>
				<TR>
					<TD height="1" bgcolor="white"><IMG src="?drawimage=spacer.gif" height="1" width="1"></TD>
				</TR>
				<TR>
					<TD align="middle" height="50">
						<TABLE bgcolor="white" ID="Table3">
							<TR>
								<TD colspan="2">
									<FONT COLOR="red"><B>!</B></FONT>&nbsp; This Status denotes the Completion of
									Task Assignment.
								</TD>
							</TR>
							<TR>
								<TD colspan="2">
									Add different status you want to maintain under a Task Type.<br>
									Task Status will be <font color="green">"awaiting"</font> by default,when Task
									is Added.
								</TD>
							</TR>
						</TABLE>
					</TD>
				</TR>
				<TR>
					<TD height="1" bgcolor="black"><IMG src="?drawimage=spacer.gif" height="1" width="1"></TD>
				</TR>
				<TR>
					<TD height="1" bgcolor="white"><IMG src="?drawimage=spacer.gif" height="1" width="1"></TD>
				</TR>
				<TR>
					<TD align="right" height="30" width="100%">
						<!--<input type="button" class="buttons" value="Back" name="btnback" id="btnback" onclick="window.history.back();">-->
						<input type="button" class="buttons" value="Finish" name="btnnext" id="btnnext" onclick="nextstep('addnew','page3','')">&nbsp;&nbsp;
						<input type="button" class="buttons" value="Delete" name="btndelete" onclick="remove()">&nbsp;&nbsp;
						<input type="button" class="buttons" value="Cancel" ID="btnCancel" onclick="window.close();" NAME="btnCancel">
					</TD>
				</TR>
			</TABLE>
			<input type="hidden" name="_hidtempstore" id="_hidtempstore"> <input type="hidden" name="_mode" ID="_mode">
			<input type="hidden" name="_pageinfo" id="_pageinfo"> <input type="hidden" name="_wizardsessionid" id="_wizardsessionid" value="#_wizardsessionid#">
			<input type="hidden" name="removetask" value="YES">
		</form>
		<SCRIPT>
	function nextstep(mode,pageinfo,tempstore)
	{
		document.wf_theform._mode.value=mode;
		tempstore += getframeinputs()
		if (tempstore != "")
		{
			document.wf_theform._pageinfo.value = pageinfo
			document.wf_theform._hidtempstore.value=tempstore;
			document.wf_theform.submit()
		}
		else
		{
			return false;
		}

	}

	function remove()
	{
		var returnvalue=getselectedvalues();
		if (returnvalue.length>0)
		{
			document.wf_theform._mode.value='remove';
			document.wf_theform._hidtempstore.value=returnvalue;
			document.wf_theform.submit()
		}
		else
		{
			alert("Please check the boxes against the Task Types you wish to Delete.");
		}
	}

	function getselectedvalues()
	{
		var i=0;
		var returnvalue="";
		var obj = eval("frame_multipleoptions");
		var tempobj;
		var d = obj.document
		var optioncount = d.wf_theform.optioncount.value
		var arroptioncount=optioncount.split("#");

		if (arroptioncount.length > 0)
		{
			for ( i = 0 ;i< arroptioncount.length;i++)
			{
				for(j=0;j<arroptioncount[i];j++)
				{
					tempobj = eval("d.wf_theform.valueDel_" + i + "_" + j)
					if (typeof(tempobj) == "undefined")
							return "";
					if(tempobj.checked)
						returnvalue += "#" + tempobj.value;

				}
			}
		}
		if (returnvalue.length > 0)
			returnvalue = returnvalue.substring(1,returnvalue.length)

		return returnvalue;


	}

	function getframeinputs()
	{
		var i=0;
		var returnvalue="";
		var obj = eval("frame_multipleoptions");
		var tempobj;
		var d = obj.document
		var optioncount = d.wf_theform.optioncount.value
		var arroptioncount=optioncount.split("#");

		if (arroptioncount.length > 0)
		{
			for ( i = 0 ;i< arroptioncount.length;i++)
			{
				tempobj = eval("d.wf_theform.TaskName" + i )
				returnvalue += "#" + tempobj.value;
				//tempobj = eval("d.wf_theform.options" + i )
				//returnvalue += ";" + tempobj.value;
				//tempobj = eval("d.wf_theform.defaultvalue_" + i )
				//returnvalue += ";" + tempobj.value;
				//alert(tempobj.value)
				for(j=0;j<arroptioncount[i];j++)
				{
					tempobj = eval("d.wf_theform.option_" + i + "_" + j)
					returnvalue += ";" + tempobj.value;
					if (tempobj.value =="")
					{
						alert('Pls enter Status for Task Type');
						tempobj.focus();
						return "";
					}
					tempobj = eval("d.wf_theform.value_" + i + "_" + j)
					if(tempobj.checked)
						returnvalue += ";" + tempobj.value;
					else
						returnvalue += ";NO";
					tempobj = eval("d.wf_theform.StatusId_" + i + "_" + j)
					returnvalue += ";" + tempobj.value;
				}
			}
		}
		returnvalue = returnvalue.substring(1,returnvalue.length)

		return returnvalue;


	}


		</SCRIPT>
	</BODY>
</HTML>
